<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <?php
            echo $this->headTitle();
            echo $this->headMeta();
        ?>
        <link href="<?php echo CSS_URL_CLUB;?>/reset.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo CSS_URL_CLUB;?>/general.css" media="screen" rel="stylesheet" type="text/css" />
        <link href="<?php echo CSS_URL_CLUB;?>/microsite_thethao.css" media="screen" rel="stylesheet" type="text/css" />
        <?php
            echo $this->headLink();
        ?>
    </head>
    <body>
        <!--Top page-->
        <?php echo $this->render('toppage.phtml');?>

        <div id="wrapper-container">
            <div id="container">
                <!--Head-->
                <?php echo $this->render('header.phtml');?>
                
                <!--Body content-->
                <?php echo $this->layout()->content;?>

                <!--Footer-->
                <?php echo $this->render('footer.phtml');?>
            </div>
        </div>
        <div id="fb-root"></div>
        <script type="text/javascript" src="<?php echo JS_URL_CLUB;?>/jquery-1.4.4.js"></script>
        <script type="text/javascript" src="<?php echo JS_URL_CLUB;?>/common.js"></script>
        <script type="text/javascript">
            var domain_url                  = '<?php echo BASE_URL_CLUB;?>';
            var widget_root_domain          = '<?php echo BANBE_URL;?>';
            var widget_static_root_domain   = '<?php echo $this->configuration['app']['banbecdn'];?>';
            var bb_plugins_consumerkey      = '<?php echo $this->configuration['domain']['banbe']['plugins']['consumerkey'];?>';
        </script>
        <script type="text/javascript" src="<?php echo $this->configuration['app']['banbest'];?>/js/jwidget.js"></script>
        <?php
            echo $this->headScript();
        ?>
    <?php if ( isset($this->viewer->userid) && $this->viewer->userid>0 ) {?>
        <script type="text/javascript">
             /*Using for appid*/
             var bbNotifyAppID                      = 105;
             /*Using to get invitation*/
             var bbNotifyInboxUrl                   = '<?php echo BANBE_URL;?>/<?php echo $this->viewer->userid;?>/request';
             var bbNotifyInboxAcceptOkCallback      = null;
             var bbNotifyInboxAcceptErrorCallback   = null;
             var bbNotifyInboxIgnoreOkCallback      = null;
             var bbNotifyInboxIgnoreErrorCallback   = null;
             var bbNotifyInboxSearchFriendUrl       = '<?php echo BANBE_URL;?>/%s/friend';
             var bbNotifyInboxUserUrl               = '<?php echo BANBE_URL;?>/%s/profile';
             /*Using to get notification*/
             var bbNotifyNotificationUrl            = '<?php echo BANBE_URL;?>/system/notifications';
             /*Using to get new message*/
             var bbNotifyMessageUrl                 = '<?php echo BANBE_URL;?>/system/message';
             var bbNotifyWriteMessageUrl            = '{"url":"", "func":"return writeMessage();", "clasCall":""}';
             var bbNotifyDetailMessageUrl           = '<?php echo BANBE_URL;?>/system/message/viewdetail/id/%s';
        </script>
        <script type="text/javascript" src='<?php echo $this->configuration['app']['notify_st'];?>/js/bb.notify.load.js' defer="defer"></script>
    <?php }//end if?>
    <?php if ( APP_ENV == 'production' ) {?>
        <script type="text/javascript">
            /**
             * GA
             */
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-249346-21']);
            _gaq.push(['_trackPageview']);

            _gaq.push(['_setAccount', 'UA-249346-37']);
            _gaq.push(['_trackPageview']);

            _gaq.push(['_setAccount', 'UA-249346-36']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

            /**
             * FOSP Web Analytics Tracker
             */
            var fpt_analytic;
            (function() {
                var fo = document.createElement('script'); fo.type = 'text/javascript'; fo.async = true;
                fo.src = 'http://180.148.135.75/fosp.common.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fo, s);
                fo.onload = function() {
                    var siteId = "11";
                    fpt_analytic = new FospAnalytics();
                    fpt_analytic.getAnalytic(siteId);
                }
            })();
        </script>
    <?php }//end if?>

    <!--Check schedule-->
    <?php if ( !$this->scheduleOpen ) {?>
        <div id="hideSchedule" style="display:none;">
            <div class="wrap_popup_login left_0_top_30" id="id_popup_schedule">
                <div class="popup_login">
                    <p style="color:#F60;">Thông báo</p>
                    <a class="close" href="javascript:;"><img src="<?php echo IMAGE_URL_CLUB;?>/icons/icon_close.gif" align="absmiddle" /></a>
                    <div class="s2" style="width:390px; text-align:center; padding-bottom:10px; height:70px;">
                      <p style="padding-top:10px; padding-bottom:10px;">Đã hết thời gian gửi bài và bình chọn. Xin cảm ơn!</p>
                      <p>
                          <input class="deletecoment" name="input" type="button" value="Đóng" onclick="jQuery.colorbox.close();" />
                      </p>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            function showScheduleClose()
            {
                jQuery.colorbox({width:"460px", inline:true, href:"#id_popup_schedule"});
            }
        </script>
    <?php }//end if?>
    </body>
</html>